<div class="row">
    <div class="col-md-8" style="width: 100%;">
        <div>
            <h4>
                <a href="<?php echo URL_BASE ?>vpanel/"><i class="glyphicon glyphicon-home"></i></a> &raquo; Ads
                <?php
                if( $_SESSION['id_admon'] == 1 ) {
                    ?>
                    <a class="btn btn-primary" href="vpanel/?id=add_ads">
                        + <i class="glyphicon glyphicon-adjust"></i>  Add Ads
                    </a>
                <?php
                }
                ?>
            </h4>
            <hr />

        </div>

        <table cellpadding="0" cellspacing="0" border="0" class="dTable">
            <thead>
            <tr>
                <th><span class="sorting" style="display: block;"></span># ID</th>
                <th>Link</th>
                <th>Images</th>
                <th>Position</th>
                <th>Actions</th>
            </tr>
            </thead>
            <tbody>
            <?php
            foreach ( $this->ads as $row ) { ?>
                <tr>
                    <td><?php echo  $row['id'] ?></td>
                    <td><?php echo  $row['href'] ?></td>
                    <td> <img style="width: 60px" src="./upload/<?php echo  $row['images'] ?>"></td>
                    <td class="statusTd"><?php echo ucfirst( $row['position'] ) ?></td>
                    <td class="statusTd">
                        <?php //if( $row['id'] != 1 && $_SESSION['id_admon'] == 1 ) : ?>
                            <a title="Edit" href="/vpanel/?edit_ads=<?php echo $row['id'] ?>" data-id="<?php echo $row['id'] ?>" id="edit">
                                <i class="glyphicon glyphicon-edit"></i>
                            </a>
                        <a style="margin-left: 15px" data-id="<?php echo $row['id'] ?>" id="delete_ads" class="btn btn-primary" href="javascript:void(0);">
                            <i class="glyphicon glyphicon-remove"></i> Delete Ads
                        </a>
                        <?php
                        //else:
                            ?>

                        <?php //endif; ?>
                    </td>
                </tr>
            <?php } ?>

            </tbody>
        </table>

    </div>
</div><!-- End row -->



